com.justhis.util
Class ResourcesReader

java.lang.Object
  extended bycom.justhis.util.ResourcesReader

public class ResourcesReader
extends java.lang.Object

TODO

Version:
$Revision: 1.1 $
Author:
acai

Constructor Summary
ResourcesReader()
           
 
Method Summary
static java.lang.String getCountry(java.lang.String encoding)
          Get the country part of a locale encoding
static java.lang.String getLanguage(java.lang.String encoding)
          Get the language part of a locale encoding
static java.util.Locale getLocale()
          Return the instance of the current locale.
static java.lang.String getLocaleEncoding()
          Return the encoding of the current locale.
static java.lang.String getTranslation(java.lang.String key)
          Lookup the translation of a particular key
static java.lang.String getTranslation(java.lang.String key, java.lang.String lookup)
          Lookup the translation of a particular key that contains exactly one lookup item within its translation
static java.lang.String getTranslation(java.lang.String key, java.lang.String[] lookup)
          Lookup the translation of a particular key that contains any number of lookup items within its translation
static java.lang.String getVariant(java.lang.String encoding)
          Get the variant part of a locale encoding
static void initBundle()
          Initialize the bundle to use the resources associated with the default locale specified by the JVM
static void setLocale(java.util.Locale locale)
          Set the Locale using a java class instance of a locale
static void setLocale(java.lang.String encoding)
          Set the Locale using a string encoding of a locale.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourcesReader

public ResourcesReader()
Method Detail

getCountry

public static java.lang.String getCountry(java.lang.String encoding)
Get the country part of a locale encoding

Parameters:
encoding - TODO
Returns:
TODO

getLanguage

public static java.lang.String getLanguage(java.lang.String encoding)
Get the language part of a locale encoding

Parameters:
encoding - TODO
Returns:
TODO

setLocale

public static void setLocale(java.util.Locale locale)
Set the Locale using a java class instance of a locale

Parameters:
locale - TODO

setLocale

public static void setLocale(java.lang.String encoding)
Set the Locale using a string encoding of a locale. Encodings are of the form: country_language_variant with only the country parameter being required. For example: en_US represents English in the united states, de_DE represents German in Germany.

Parameters:
encoding - TODO

getLocale

public static java.util.Locale getLocale()
Return the instance of the current locale.

Returns:
TODO

getLocaleEncoding

public static java.lang.String getLocaleEncoding()
Return the encoding of the current locale.

Returns:
TODO

getTranslation

public static java.lang.String getTranslation(java.lang.String key)
Lookup the translation of a particular key

Parameters:
key - TODO
Returns:
TODO

getTranslation

public static java.lang.String getTranslation(java.lang.String key,
                                              java.lang.String lookup)
Lookup the translation of a particular key that contains exactly one lookup item within its translation

Parameters:
key - TODO
lookup - TODO
Returns:
TODO

getTranslation

public static java.lang.String getTranslation(java.lang.String key,
                                              java.lang.String[] lookup)
Lookup the translation of a particular key that contains any number of lookup items within its translation

Parameters:
key - TODO
lookup - TODO
Returns:
TODO

getVariant

public static java.lang.String getVariant(java.lang.String encoding)
Get the variant part of a locale encoding

Parameters:
encoding - TODO
Returns:
TODO

initBundle

public static void initBundle()
Initialize the bundle to use the resources associated with the default locale specified by the JVM



Copyright © 2003 EastNetworks.Net(China)Co.,Ltd.. All Rights Reserved.